package com.vaha.domain.request;

import org.springframework.beans.BeanUtils;
import com.cyber.domain.entity.PagingRequest;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import com.vaha.domain.entity.Commission;

@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
public class CommissionRequest extends PagingRequest {
	
	
	/**编码*/
	private String code;
	/**产品编码*/
	private String productCode;
	/**代理编码*/
	private String agentCode;
	/**分佣层级*/
	private Integer commissionDeep;
	/**分佣配置*/
	private String commissionConfig;
	/**分佣介绍*/
	private String commissionIntroduction;
	
	
	public Commission toEvent(String tenantCode) {
		Commission commission = new Commission();
		BeanUtils.copyProperties(this, commission);
        commission.setTenantCode(tenantCode);
		return commission;
	}
}